From: Keir Fraser Date: Mon, 21 Jun 2010 08:57:10 +0000 (+0100) Subject: xencommons: modprobe xenfs if it not be loaded X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11902 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=0ca1bba0a609cae055a5cf610889d47ceee6d661;p=xen.git xencommons: modprobe xenfs if it not be loaded If xenfs is compiled as a module, now cannot complete 'service xencommons start', modprobe xenfs can fix it. Signed-off-by: Yu Zhiguo --- diff --git a/tools/hotplug/Linux/init.d/xencommons b/tools/hotplug/Linux/init.d/xencommons index d8680fba02..6885cb924c 100644 --- a/tools/hotplug/Linux/init.d/xencommons +++ b/tools/hotplug/Linux/init.d/xencommons @@ -24,16 +24,21 @@ test -f /etc/sysconfig/xencommons && . /etc/sysconfig/xencommons XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid shopt -s extglob -if test "x$1" = xstart && \ - test -d /proc/xen && \ - ! test -d /proc/xen/capabilities && \ - grep ' xenfs$' /proc/filesystems >/dev/null && \ - ! grep '^xenfs ' /proc/mounts >/dev/null; -then - mount -t xenfs xenfs /proc/xen +if test "x$1" = xstart; then + if ! grep ' xenfs$' /proc/filesystems >/dev/null; then + test -x /sbin/modprobe && /sbin/modprobe xenfs 2>/dev/null + fi + if test -d /proc/xen && \ + ! test -d /proc/xen/capabilities && \ + grep ' xenfs$' /proc/filesystems >/dev/null && \ + ! grep '^xenfs ' /proc/mounts >/dev/null; + then + mount -t xenfs xenfs /proc/xen + fi fi -if ! grep -q "control_d" /proc/xen/capabilities ; then +if ! test -e /proc/xen/capabilities || \ + ! grep -q "control_d" /proc/xen/capabilities ; then exit 0 fi